export interface ResponseInterface<T = any> {
  code: number;
  message: string;
  data?: T;
}

export class ResponseSuccess<T = any> implements ResponseInterface<T> {
  code: number;
  message: string;
  data?: T;

  constructor(data?: T, message = 'Success') {
    this.code = 0;
    this.message = message;
    if (data !== undefined) {
      this.data = data;
    }
  }
}

export class ResponseError implements ResponseInterface {
  code: number;
  message: string;

  constructor(code = 1, message = 'Error') {
    this.code = code;
    this.message = message;
  }
} 